<?php
class Zend_View_Helper_TranslationLink
{
	public function translationLink($baseUrl,$module,$controllerName,$actionName,$linkName,$idPage,$lang)
	{
		$strLink = "<a href='$baseUrl/$module/$controllerName/$actionName";
		if($linkName != null)
			$strLink .= "/$lang/$linkName.html";
		elseif($idPage != null)
			$strLink .= "/id/$idPage/lang/$lang";
		else
			$strLink .= "/lang/$lang";
			
		if($lang == 'vn')
			$src = "vn_flag.gif";
		elseif($lang == 'en')
			$src = "en_flag.gif";
		$strLink .= "'><img style='border: 0 none;' width='16px' height='16px' src='$baseUrl/public/media/images/default/$src' /></a>";
		
		echo $strLink;
	}
}
?>